import sqlite3
import multiprocessing
import multiprocessing.pool

mDict: dict


def test():
    print(mDict)
    pass


if __name__ == "__main__":
    mDict = multiprocessing.Manager().dict()
    conn = sqlite3.connect("test.db", check_same_thread=False)
    mDict.setdefault("conn", conn)
    worker = multiprocessing.Pool(processes=1)
    worker.apply_async(func=test)
